You may use a component as an identifier of an entity class. Your component class must satisfy certain requirements: * It must be Serializable. * It must re-implement Equals() and GetHashCode(), consistently with the database's notion of composite key equality. You can't use an IIdentifierGenerator to generate composite keys. Instead the application must assign its own identifiers. Since a composite identifier must be assigned to the object before saving it, we can't use unsaved-value of the identifier to distinguish between newly instantiated instances and instances saved in a previous session. You may instead implement IInterceptor.IsUnsaved() if you wish to use SaveOrUpdate() or cascading save / update. As an alternative, you may also set the unsaved-value attribute on a version or timestamp to specify a value that indicates a new transient instance. In this case, the version of the entity is used instead of the (assigned) identifier and you don't have to implement IInterceptor.IsUnsaved() yourself.
Parameters
Expression<Func<T, TComponentType>>
expression